#include "vo_sdi.h"
#include "commonDefine.h"


#include "sample_comm.h"

static sample_vo_cfg g_vo_cfg = {
    .vo_dev            = VCAP_VO_DEV_UHD,
    .vo_intf_type      = OT_VO_INTF_BT1120,
    .intf_sync         = OT_VO_OUT_1080P60,
    .pic_size          = PIC_1080P,
    .bg_color          = COLOR_RGB_BLUE,
    .pix_format        = OT_PIXEL_FORMAT_YVU_SEMIPLANAR_420,
    .disp_rect         = {0, 0, 1920, 1080},
    .image_size        = {1920, 1080},
    .vo_part_mode      = OT_VO_PARTITION_MODE_SINGLE,
    .compress_mode     = OT_COMPRESS_MODE_NONE,
    .dis_buf_len       = 3, /* 3: def buf len for single */
    .dst_dynamic_range = OT_DYNAMIC_RANGE_SDR8,
    .vo_mode           = VO_MODE_1MUX,
    .sync_info         = {},
    .user_sync         = {},
    .dev_frame_rate    = 60,
};

static td_s32 sample_vio_start_vo(sample_vo_mode vo_mode)
{
    g_vo_cfg.vo_mode = vo_mode;

    return sample_comm_vo_start_vo(&g_vo_cfg);
}


int vo_sdi_sys_init(){

    td_s32 s32Ret = sample_vio_start_vo(VO_MODE_1MUX);
    if(s32Ret != TD_SUCCESS){
        INFO_PRT("error sample_vio_start_vo %x\n",s32Ret);
        return -1;
    }

//    sample_comm_vpss_bind_vo()


    return 0;
}